# Copyright (c) 2024 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

FROM registry.openanolis.cn/openanolis/anolisos:23

LABEL \
    maintainer="OpenAnolis AI SIG" \
    org.opencontainers.image.title="oneapi runtime" \
    org.opencontainers.image.version="2024.1-runtime"

RUN dnf install procps-ng -y

# Setup Anolis EPAO repository and install Intel(R) GPU drivers
RUN dnf install anolis-epao-release -y

RUN dnf install intel-gmmlib intel-gsc intel-igc-cm intel-igc-core \
	intel-igc-opencl intel-level-zero-gpu intel-ocloc intel-opencl \
	level-zero libmetee -y

# Setup Intel(R) oneAPI repository and install Intel(R) oneAPI runtime Libraries
RUN echo $'\
[oneAPI]\n\
name=Intel(R) oneAPI repository\n\
baseurl=https://yum.repos.intel.com/oneapi\n\
enabled=1\n\
gpgcheck=1\n\
repo_gpgcheck=1\n\
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB' \
> /etc/yum.repos.d/oneAPI.repo

RUN dnf install intel-oneapi-mkl-2024.1 intel-oneapi-compiler-dpcpp-cpp-runtime-2024.1 \
	intel-oneapi-compiler-shared-runtime-2024.1 -y

# Setup Intel(R) oneAPI working environment
RUN echo 'source /opt/intel/oneapi/setvars.sh' >> /root/.bashrc

CMD ["/bin/bash"]
